<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vue.js学习</title>
    <script src="https://unpkg.com/vue/dist/vue.js"></script>   <!--引入vue.js-->
</head>
<body>
    <div id="xue">
        <ol>
            <!--<hahahah v-for="it in its" v-bind:language="it"></hahahah>-->
            <hahahah v-for="it in its" :language="it"></hahahah>   <!-- v-bind的简写  -->
        </ol>
    </div>
    <script>
        /* 组件定义：game-item */
        Vue.component('hahahah', {
            props: ['language'],
            template: '<li>{{ language.title }}</li>'
        });
        /* Vue对象实例化 */
        var hehe = new Vue({
            el: '#xue',
            data: {
                its: [
                    { title: 'PHP' },
                    { title: 'JAVA' },
                    { title: 'PYTHON' }
                ]
            }
        });
    </script>
</body>
</html>